<template>
	<view :class="['page',{'iphoneX':isIphoneX}]">
		<view v-if="isLogin" class="body">	 
			<template>
				<view class="project-form-wrap m-b2">  
					<view class="form-wrap m-b2" v-for="(item,index) in detail.devlist" :key="index">
						<view class="form-item">
							<view class="label">设备名称：</view>
							<view class="form-input">
								<view class="content">
									<input type="text" class="inp" v-model="item.device_name" disabled placeholder="输入商品名称" />
								</view>				
							</view>			
						</view> 
						<view class="form-item">
							<view class="label">需求数量：</view>
							<view class="form-input">
								<view class="content">
									<input type="text" class="inp" v-model="item.num" disabled placeholder="输入商品数量" />
								</view>				
							</view>	 
						</view>   
					</view>
					<view class="form-wrap m-b2"> 
						<view class="form-item">
							<view class="label">交货时间：</view>
							<view class="form-input">
								<view class="content">
									<input type="text" class="inp" v-model="detail.delivery_time" disabled placeholder="输入商品数量" />
								</view>				
							</view>			
						</view>     
						<view class="form-textarea-item">
							<view class="label a-t">备注信息</view>
							<view class="form-textarea">
								<textarea class="inp-textarea" v-model="detail.remark" disabled placeholder="备注信息(选填)" maxlength="-1"></textarea>
							</view>
						</view> 
					</view>
				</view> 
			</template>
			 
		</view> 
		  
	</view>
</template>

<script>
	import {
			checkPhone
		} from '@/common/util.js'
	export default {
		data() {
			return {
				isIphoneX:getApp().globalData.isIphoneX,
				isLogin: false,
				companyList:[],
				projectType:[],
				termTypeList:[],
				id:'',
				type:'add',
				detail:{},
				isStop:true,
				loadingState:{
					default:true
				}
			}
		},
		async onLoad(params) {
			console.log(params)
			this.isLogin=await this.$loginState('check');
			this.id=params.id; 
			this.type=params.type; 
			if(this.isLogin){  
				this.getDetail();  
			} 
		},
		methods: {
			  
			
			// 获取项目详情
			async getDetail(){
				let res=await this.$api.user_api.devneedinfo({
					id:this.id
				})  
				if(res.data.code==200){
					this.loadingState.default=false; 
					this.detail=res.data.data; 
				}
			},
			 
			
			
		}
	}
</script>

<style lang="less" scoped>
	.project-form-wrap{
		padding: 20rpx 0 0; 
	}
	.hd-title{
		margin:0 20rpx 20rpx;
		padding-left:20rpx;
		border-left: 8rpx solid #0099ff;
		font-size: 30rpx;
		font-weight: bold;
	}
	
	.created-btn-wrap{
		display: flex;
		.btn{
			height: 80rpx;
			line-height: 80rpx;
			margin: 10rpx 10rpx 0;
			flex-grow: 1;
			border-radius: 8rpx;
			text-align: center;
			font-size: 30rpx;
			color:#fff;
		}
		.next-btn{
			background: #ff9600; 
		}
		.submit-btn{
			background: #0099ff; 
		}
	} 
	.step-bar{
		height: 90rpx;
		margin-bottom: 20rpx;
		.fix-wrap{
			display: flex;
			height: 90rpx;
			background: #fff;
		}
		.item{
			flex-grow: 1;
			width: 25%;
			text-align: center;
			color:#999;
			.text{
				font-size: 28rpx;				
			}
			.icon{
				width: 40rpx;
				height: 40rpx;
				margin:0 auto 0; 
			}
		}
		.active{
			.text,.icon{
				color:#09f;				
			} 
		}
	}
</style>
